package com.dongdongshop.config;

//*类名：AlipayConfig
//        *功能：基础配置类
//        *详细：设置帐户有关信息及返回路径
//        *修改日期：2017-04-05
//        *说明：
//        *以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
//        *该代码仅供学习和研究支付宝接口使用，只是提供一个参考。
//        */

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000118620199";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDfnHLe4rjXacuWyjgZYOvixlG59Xc5GzuO3LS+Mf+xXNAjiOkh4hdMcgWOxPCSkP6bnyD9rA/wBG8HNWVvd6oQaYK6fh1kwOQm3TxF2grr4NegeCUbqkQbxH0rN8NK6D4DzIr/KsNEUvHpHj8z/lOn0tbVIGbyc4FgXKNiSd95l7aE92VgJrjOxsYLdPigOkfB4gJNHBHWkRoNbvTindK9WXomTh/n4+gUxTSwIt+1JSncIahm6FAYztfNLfONWv7wWuEZd/R5ahcNmtMC04xIlR9yEkmm2a71mxhozQB6wjM00uPLfXmxS95XNwZWFoygCAR79kZE81GkrJNomB5HAgMBAAECggEAOGkKXYoKoWUyE/89ucFGoLXxJh1zjzd8heTNv/FzFLZaV6yRS5fy0rktB8BNBFyJro6tTvFaL+2eaM4iocUpZOyJKyznk2RJ6jgDnYeNG8Zj/zpv+hOxDOQ7w2xU2w/NnT27jvWlvxXBq1KTFTXCuuKoiamb7uwOplWYbhI+yzhuyVOWUdIx4cL8heK4Zl7rWEyY9EP5n4Kq/h+YdSgmtIk77MhXQbfCHeDl5Y6Dvt6nyJHB+j+DFrUQ7KGzwX58g62RT9D/phEYYZw/MN1o2RBYklKupExUlfhST3J2QF/rN9SV3RzNgZYAC9+VOmX4XcBtc5Q9h05Ktyye6RnBKQKBgQD9tbb9jOnuDKmcrzf8XkQ+XDdPtZNil44t72UdjFIqIomnzBLiMBDN4BKG3GrvPZcv7YEwPv4e1GOTF33NObGLYtTeZIH9AUhYS4EhcEVsDea1Gr5uDHxQPJvp/4RXqZqVaLmDLMt3MSmtemkdLWeHvG4leL49HjgcqCpF3zRj9QKBgQDhoS4rsZkNJ7UqVnluY+HJrSSF9AGt//iGT+Nub4KFbfR/H+3pl3Jr89WhWu997K+s3Sb8yxhUgYBw5Am8Ne20nWS8N4i76oR3IgfX7NGUVnjwTMdmvoFXcL/A9Qg4DFkgKZh957lS/yxmkEmI8MRoCeGTQ4uCYk087CsAcfuPywKBgDz62CjJHdDhqkLGuqYl4jE66PB3rB0eYEYaLCuV9om6E2wJWOCUvPU+zjUr9WfbXeNfKpX2Dg5K7kQEeXBCVbIy5wctETFGhaTzQO5Qld8K2FDfRLYeuiJu7uqnR5/qXAVdTnmA4sabQnE34tvodeHiIHdRNihqgwIgSUjSBT2hAoGBAMwKOHim+KOe3wRUgyfDB7Kb80V37fTuYE8F+8Qo7z2+u7Yip8HwhTb+oJh0ZdPYsN2AePtupqf1HLP6ZJthoX8OPsS+69YUNIqPqcwoiza8JE4bAM/3Q3xRp/bVIAOflxGwzAg//6YAwKRXo0hFgzgah3XnRUg5oWOQpyqV6UqVAoGBAIsFnXu1VVeQmXabn/LgkSH1edwfImVYrAkRjVgp0XkWw8vbfHQSJSfvixD20lSEjjmwNfeJkEP4S22Pia32dDP2TyJWs1s7E8K7WF2UFUWLA2GQIPT8ZvXRJddnPNg/L2LM0axIt0J4We4qjqlM3N7B3F+Nea7yNrfRYfJJUMAF";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAubliRFwuOF56eJ0tcRwQ6P+UG/gNRm3itZgPDBe8oy0HdBGBA8DIesfC/dOoq5A2jdT+h8Sdh58S7nTOiS1xKQYvNuDaDlU6HfQDmsAR10tu0PYHdXcz490Kq6tR0DzMDo5WrUz3ii79V1C17hyxY+LbVp8WtWh4PkdTM4cGnjqGgDNjdI03gXUuT92GGK+ZtNcmr0kvbKW0/tD9HIFsF2S7ezIIXoi1WXp5m6bLT/y9V+uy4krB+oNNDh4o7MtQv/aUDlv9p1TK2V1wMhll0KTzRyiQP0s5S9huL2rZGLIxieNCVMfWuCOwE1hVg9cGurTJPuv+fepeHSEGQUprcQIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://y43v733839.qicp.vip/aliPayCallBack/notifyUrl";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://y43v733839.qicp.vip/aliPayCallBack/returnUrl";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "E:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
